package com.example.exam.pojo;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author
 * @date 2023/03/10
 *
 * 题目成绩
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName
public class Achievement implements Comparable<Achievement> {
    /**
     * 主键
     */
    @JsonIgnore
    @TableId
    private int id;

    /**
     * 手机号或学号
     */
    private String sid;

    /**
     * 题号
     */
    private int tid;

    /**
     * 成绩
     */
    private int grade;

    /**
     * 评分员
     */
    private String rater;

    @Override
    public int compareTo(Achievement o) {
        return this.getTid() - o.getTid();
    }
}
